<?php

/**
 * seccion actions.
 *
 * @package    catalogo
 * @subpackage seccion
 * @author     Your name here
 * @version    SVN: $Id: actions.class.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class seccionActions extends sfActions
{
  public function executeShow(sfWebRequest $request)
  {
    $this->seccion = $seccion = Doctrine::getTable('Seccion')->find(array($request->getParameter('id')));
    $this->forward404Unless($this->seccion);
    
    switch ($request->getParameter('id')){
  	 case 5: $this->setLayout('layout-2cols'); break;
  	 case 9: $this->setLayout('layout-nocols'); break;
    }
    
    $response = $this->getResponse();
    $response->addMeta('keywords'       , $seccion->getMetaKeywords()); 
    $response->addMeta('description'    , $seccion->getMetaDescription());
    $response->addMeta('dc.keywords'    , $seccion->getMetaKeywords()); 
    $response->addMeta('dc.description' , $seccion->getMetaDescription());
    $response->addMeta('dc.title' , $seccion->getTitle() .' - '. sfConfig::get('app_title_tail'));
  }
}
